/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 对话框遮罩层样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.dialog-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

.dialog-content h2 {
    color: #e91e63;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: bold;
}

.dialog-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.dialog-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.confirm-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.cancel-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #ddd;
}

.cancel-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* 主页面内容样式 */
.main-content {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.birthday-container {
    text-align: center;
    color: white;
}

.birthday-container h1 {
    font-size: 3rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: bounce 2s infinite;
}

/* 礼物盒子样式 */
.gift-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
}

.gift-lid {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

.gift-body {
    width: 200px;
    height: 150px;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
}

.gift-body p {
    margin: 5px 0;
    font-size: 14px;
    font-weight: bold;
}

/* 祝福语容器 */
.blessings-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

/* 祝福语div块样式 */
.blessing-item {
    position: absolute;
    padding: 20px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: blessingFloat 3s ease-in-out forwards;
    pointer-events: none;
    z-index: 999;
    max-width: 220px;
    word-wrap: break-word;
    backdrop-filter: blur(15px) saturate(180%);
    border: 3px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.4;
}

/* 庆祝消息样式 */
.celebration-message {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out;
}

.celebration-message p {
    font-size: 20px;
    margin: 15px 0;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}



/* 移除气球样式 */

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* 祝福语随机位置出现动画（不消失版） */
@keyframes blessingFloat {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
        filter: blur(10px);
    }
    30% {
        opacity: 1;
        transform: scale(1.1) rotate(5deg);
        filter: blur(0px);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
}

/* 气球样式 - 简洁动画版本 */
.balloon {
    --width: calc(var(--size, 10) * 1vmin);
    height: calc(1.2 * var(--width));
    width: var(--width);
    background: hsla(var(--hue), 100%, 50%, 0.8);
    border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
    position: fixed;
    bottom: -1000px; /* 从页面底端以下开始 */
    left: var(--left, 50%);
    z-index: 9998;
    animation: float calc(var(--rate, 1) * 1s) calc(var(--delay, 0) * -1s) infinite linear both;
}

.balloon:before {
    content: '';
    position: absolute;
    width: 20%;
    height: 30%;
    top: 8%;
    left: 16%;
    border-radius: 50%;
    transform: rotate(40deg);
    background: hsla(0, 0%, 100%, 0.75);
}

.handle {
    width: 2%;
    height: 60%;
    background: hsl(45, 100%, 40%);
    top: 100%;
    left: 50%;
    transform: translate(-50%, 0);
    position: absolute;
}

.handle:before, .handle:after {
    content: '';
    position: absolute;
    height: 5%;
    transform: translate(-50%, 0);
    border-radius: 25% / 50%;
    left: 50%;
}

.handle:before {
    top: 0;
    background: hsl(45, 100%, 40%);
    width: 500%;
}

.handle:after {
    top: 5%;
    background: hsla(var(--hue), 100%, 50%, 0.8);
    width: 700%;
}

@keyframes float {
    from { 
        transform: translateX(-50%) translateY(0);
        bottom: -100px;
    }
    to { 
        transform: translateX(-50%) translateY(-100vh);
        bottom: calc(100vh + 100px);
    }
}

/* 移除气球升起动画 */

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .birthday-container h1 {
        font-size: 2rem;
    }
    
    .gift-box {
        width: 150px;
        height: 150px;
    }
    
    .gift-body {
        width: 150px;
        height: 120px;
    }
    
    .dialog-container {
        padding: 20px;
        margin: 20px;
    }
    
    .dialog-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
}